package pl.pyjter;

import java.util.List;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		LibraryHibImpl library = new LibraryHibImpl();
		
		List<Author> authors = library.getObjects("Author");		
		for(Author author : authors) {
			author.display();
		}
		
		List<Book> books = library.getObjects("Book");		
		for(Book book : books) {
			book.display();
		}
		
		List<Publisher> publishers = library.getObjects("Publisher");
		for(Publisher publisher : publishers) {
			publisher.display();
		}
		
//		Publisher publisher =  new Publisher();
//		publisher.setName("Ksiaznica");
//		library.insertObject(publisher);
		
//		library.deleteObject(Book.class, 2);		
//		Author author = library.getObject(Author.class, 2);
//		author.setSurname("King");
//		library.updateObject(author);
//		library.insertObject(author);
//		Author author = new Author();
//		author.setName("Stephen");
//		author.setSurname("King");
//		library.insertObject(author);
//		Author author = new Author();
//		author.setName("William");
//		author.setSurname("Gibson");
//		library.insertObject(author);
//		Book book = new Book();
//		book.setTitle("Narreturm");
//		library.insertObject(book);
//		library.deleteObject(book);
//		library.insertBook(book);
		
//		library.deleteBook(book);

	}

}